public class UT_EntitlementList{

    static testMethod void EntitlementList_Test(){
        EntitlementList el = new EntitlementList();
        
        //Get IDs
        UT_SObjectFactory.InterconnectedSObjectsForNCSP sobs = new UT_SObjectFactory.InterconnectedSObjectsForNCSP(false,1);
        Id retUrlId = sobs.a.Id;  // getAnyId('account');
        Id contId = sobs.c.Id;  // getAnyId('contact');
        Id acId = retUrlId; 
        String prmFunc = 'addcasestoentitlement';
        Id prmEntId = sobs.e.Id;  // getAnyId('entitlement');
        Id prmSpId = sobs.sp.Id;  // getAnyId('supportprogram');
        String prmEntName = 'any name';
        String prmAstId = sobs.paArr[0].Id;
        String prmAstName = sobs.paArr[0].Name;

        PageReference p = el.CreateNewCase(retUrlId, contId, acId, prmFunc, prmEntId, prmSpId, prmEntName, prmAstId, prmAstName);
    }
    
    static testMethod void testCreateNewCase_NullAssetId() {
        EntitlementList el = new EntitlementList();
        
        //Get IDs
        UT_SObjectFactory.InterconnectedSObjectsForNCSP sobs = new UT_SObjectFactory.InterconnectedSObjectsForNCSP(false,1);
        Id retUrlId = sobs.a.Id;  // getAnyId('account');
        Id contId = sobs.c.Id;  // getAnyId('contact');
        Id acId = retUrlId; 
        String prmFunc = 'addcasestoentitlement';
        Id prmEntId = sobs.e.Id;  // getAnyId('entitlement');
        Id prmSpId = sobs.sp.Id;  // getAnyId('supportprogram');
        String prmEntName = 'any name';
        String prmAstId = '';     //sobs.paArr[0].Id;
        String prmAstName = '';   //sobs.paArr[0].Name;
        PageReference pr = el.CreateNewCase(retUrlId, contId, acId, prmFunc, prmEntId, prmSpId, prmEntName, prmAstId , prmAstName ); 
        System.assertNotEquals(null, pr, 'CreateNewCase should not fail for null asset Id');
    }
    
    static testMethod void testCreateNewCase_NonNullAssetId() {
        EntitlementList el = new EntitlementList();
        
        //Get IDs
        UT_SObjectFactory.InterconnectedSObjectsForNCSP sobs = new UT_SObjectFactory.InterconnectedSObjectsForNCSP(false,1);
        Id retUrlId = sobs.a.Id;  // getAnyId('account');
        Id contId = sobs.c.Id;  // getAnyId('contact');
        Id acId = retUrlId; 
        String prmFunc = 'addcasestoentitlement';
        Id prmEntId = sobs.e.Id;  // getAnyId('entitlement');
        Id prmSpId = sobs.sp.Id;  // getAnyId('supportprogram');
        String prmEntName = 'any name';
      //  ID prmAstId = sobs.paArr[0].Id;
      //  String prmAstName = sobs.paArr[0].Name;
        
        Account a = new Account(name='whenever');
        insert a;
        Asset ast = new Asset(Name='whatever', AccountId=a.Id);
        insert ast;
        PageReference pr = el.CreateNewCase(retUrlId, contId, acId, prmFunc, prmEntId, prmSpId, prmEntName,ast.Id,ast.Name);
        System.assertNotEquals(null, pr, 'CreateNewCase should not fail for non-null asset name and id');
    }

  
}